package com.ruoyi.framework.config.properties;

import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * security  参数配置
 *
 * @author xueyu
 */
@Setter
@Component
@ConfigurationProperties(prefix = "security")
@PropertySource(value = {"classpath:config/security-config/security.properties"})
public class SecurityConfigProperties {
    /**
     * jwt鉴权过滤器放行地址 避免解析令牌、操作数据库、操作缓存比较等操作 提升性能
     */
    private List<String> jwtAnonymousUrls;


    public Set<String> getJwtAnonymousUrls() {
        return new HashSet<>(jwtAnonymousUrls);
    }


}
